import service from '../utils/request'

export function fetchScoreTaskByCondition (data) {
    return service({
        url: '/score/select',
        method: 'post',
        data
    })
}

export function updateReplayScore (data) {
    return service({
        url: `/score/replay`,
        method: 'put',
        data
    })
}

export function updateReportscore (data) {
    return service({
        url: '/score/report',
        method: 'put',
        data
    })
}

export function updateReplayProportion (data) {
    return service({
        url: '/score/replayproportion',
        method: 'put',
        data
    })
}


export function selectByTeacherID (params) {
    return service({
        url: `/score/teacher/${params}`,
        method: 'get'
    })
}

export function calculateScore (params) {
    return service({
        url: `/score/calculate/${params}`,
        method: 'put'
    })
}

export function getUserId (params) {
    return service({
        url: `/user/name/${params}`,
        method: 'get'
    })
}